<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="box">
        <!-- <lee style="color: pink;"></lee> -->
        <!-- <component is='lee'></component> -->
        <!-- <c_lee></c_lee> -->
        <lee v-for="i in num">{{i}}</lee>
    </div>
    <template id='lee'>
        <div>
            <button @click="num++">++</button>{{num}}
        </div>
    </template>
</body>
<script src="../js/vue.js"></script>
<script>
    Vue.component('lee',{
        template:'#lee',
        data(){
            return{
                num:20
            }
        }
    })
    new Vue({
        el:"#box",
        data:{
            num:10
        },
        components:{
            c_lee:{
                template:"#lee"
            }
        }
    })
</script>
</html>